package com.qingke.easyjava.factory;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DemoFactory {
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beanfactory.xml");
		Car car1 = context.getBean("car",Car.class);
		System.out.println(car1);
		
		Car car2 = context.getBean("car2",Car.class);
		System.out.println(car2);
		
		context.close();
	}
	
	
}
